home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / eflibpt4.zip / DEMO / STRINGS / STRING2.PAS < prev    next >
Pascal/Delphi Source File  |  1996-08-16  |  1KB  |  38 lines

  1. { Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
  2.   Demonstration; basic string handling #2
  3.  
  4.   EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
  5.   MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
  6.   ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED.                          }
  7.  
  8.  
  9. uses EFLIBBAS, EFLIBTXT;
  10.  
  11.  
  12. begin
  13.      WriteLn;
  14.      WriteLn (StringFixedCentered(StringDoubled('Flexible routines for'), 79));
  15.      WriteLn (StringFixedCentered(StringDoubled('string handling!'), 79));
  16.      WriteLn;
  17.  
  18.      WriteLn (StringCentered('- Some features -' + StringFill (60, #32)));
  19.      WriteLn;
  20.  
  21.      WriteLn (StringFill (15, #32), { 10 blank spaces }
  22.               StringStripped ('- Remove leading or trailing blank spaces           '), '!');
  23.  
  24.      WriteLn (StringSpace (15), { 10 blank spaces }
  25.               StringReplace ('- Replace x from inside a string!', 'x', 'substrings'));
  26.  
  27.      WriteLn  (StringSpace (15),
  28.                '- Count the occurrence of substrings inside strings (',
  29.                StringOccurrence ('z', 'zzzZ'), ')!');
  30.  
  31.      WriteLn (StringSpace (15),
  32.               '- Search positions of substrings in many ways (',
  33.               StringForwardPos ('1', '121', 2), '/',
  34.               StringBackwardPos ('1', '121', 2), ')!');
  35.  
  36.      WriteLn (StringSpace (15),
  37.               '- And much more!');
  38. end.